--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 681295a818db4cecfc457357e1ddb93d57494722
Parents : a4f5b28
Author : Mark Qvist <mark@unsigned.io>
Date : 2023-02-04T16:43:50+01:00
Create examples directory on init
Changes
3 files changed, 12 insertions(+), 0 deletions(-)
Diff
diff --git a/nomadnet/NomadNetworkApp.py b/nomadnet/NomadNetworkApp.py
index 701869b..2efa8c1 100644
--- a/nomadnet/NomadNetworkApp.py
+++ b/nomadnet/NomadNetworkApp.py
@@ -111,6 +111,7 @@ class NomadNetworkApp:
self.pagespath = self.configdir+"/storage/pages"
self.filespath = self.configdir+"/storage/files"
self.cachepath = self.configdir+"/storage/cache"
+ self.examplespath = self.configdir+"/examples"
self.downloads_path = os.path.expanduser("~/Downloads")
@@ -169,6 +170,9 @@ class NomadNetworkApp:
else:
RNS.log("Could not load config file, creating default configuration file...")
self.createDefaultConfig()
+ if not os.path.isdir(self.examplespath):
+ os.makedirs(self.examplespath)
+
self.firstrun = True
if os.path.isfile(self.identitypath):
diff --git a/nomadnet/vendor/quotes.py b/nomadnet/vendor/quotes.py
index ee142f7..4c87571 100644
--- a/nomadnet/vendor/quotes.py
+++ b/nomadnet/vendor/quotes.py
@@ -3,4 +3,5 @@ quotes = [
("That's enough entropy for you my friend", "Unknown"),
("Any time two people connect online, it's financed by a third person who believes they can manipulate the first two", "Jaron Lanier"),
("The landscape of the future is set, but how one will march across it is not determined", "Terence McKenna")
+ ("Freedom originates in the division of power, despotism in its concentration.", "John Acton")
]
\ No newline at end of file
diff --git a/setup.py b/setup.py
index fadae5d..b3fadd6 100644
--- a/setup.py
+++ b/setup.py
@@ -5,6 +5,12 @@ exec(open("nomadnet/_version.py", "r").read())
with open("README.md", "r") as fh:
long_description = fh.read()
+package_data = {
+"": [
+ "examples/messageboard/*",
+ ]
+}
+
setuptools.setup(
name="nomadnet",
version=__version__,
@@ -15,6 +21,7 @@ setuptools.setup(
long_description_content_type="text/markdown",
url="https://github.com/markqvist/nomadnet",
packages=setuptools.find_packages(),
+ package_data=package_data,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────